﻿using System;
class ExtractPalindromes
{
    static void Main()
    {
        int counter = 0;
        int backInd = 0;
        string text = "ABBA own making In the future  lamal Environmental destruction will be the nor";
        Console.WriteLine(text);
        Console.WriteLine();
        string[] words = text.Split(new char[] { ' ', ',' }, StringSplitOptions.RemoveEmptyEntries);
        for (int i = 0; i < words.Length; i++)
        {
            counter = 0;
            backInd = words[i].Length - 1;
            for (int j = 0; j < words[i].Length / 2; j++)
            {
                if (words[i].Substring(j, 1) == words[i].Substring(backInd, 1))
                {
                    counter++;
                }
                backInd--;
            }
            if ((counter == words[i].Length / 2) && (words[i].Length != 1))
            {
                Console.WriteLine("\"{0}\" is a palindrome", words[i]);
            }
        }
        Console.ReadLine();
    }
}

